#pragma once

#include <QString>
#include <QJsonObject>

namespace WordMemory
{
    struct User
    {
        int _id;
        QString _username;
        QString _password;
        QString _realName;
        QString _createdAt;

        User(int id = 0,
             const QString &username = "",
             const QString &password = "",
             const QString &realName = "",
             const QString &createdAt = "");

        QJsonObject toJson() const;

        static User fromJson(const QJsonObject &json);
    };
}
